//
//  OpShoppingCarController.m
//  LoveFreshBeeReplica
//
//  Created by skywalker on 16/12/30.
//  Copyright © 2016年 斯芬克斯. All rights reserved.
//

#import "OpShoppingCarController.h"
#import "OpDefaultView.h"
#import "OpAdressView.h"
#import "OpTableFootView.h"
#import "OplightningView.h"
@interface OpShoppingCarController ()<UITableViewDataSource,UITableViewDelegate,OpTabelFootViewDeleagte>
@property(nonatomic,strong)OpDefaultView * defaultView;
@property(nonatomic,strong)OpAdressView * addressView;
@property(nonatomic,strong)OpTableFootView * footerView;
@property(nonatomic,strong)UIView * headView;
@property(nonatomic,strong)UITableView  * tableView;
@property(nonatomic,strong)OplightningView * lightningView;
@property(nonatomic,strong)NSArray  * dataList;
@end

@implementation OpShoppingCarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self buildDefaultView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark -进入第一个界面
-(void)buildDefaultView{
    _defaultView=[[OpDefaultView alloc]init];
    _defaultView.hidden=NO;
    [self.view addSubview:self.defaultView];
    [_defaultView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
        make.width.equalTo(self.view);
        make.height.mas_equalTo(170);
    }];
    
}
#pragma mark -头部视图
-(void)buildTableHeaderView{
    self.headView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, 100)];
    OpAdressView  * addresss=[[OpAdressView  alloc]initWithFrame:CGRectMake(0, 10, self.view.bounds.size.width, 150)];
    OplightningView  * lightningView=[[OplightningView   alloc]initWithFrame:CGRectMake(0, 70, self.view.bounds.size.width, 30)];
    [self.headView addSubview:addresss];
    [self.headView addSubview:lightningView];
    self.tableView.tableHeaderView=self.headView;
}
#pragma mark -tablevIEW
-(void)buildTabelView{
    self.tableView=({
        UITableView * tableView=[[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStyleGrouped];
        tableView.delegate=self;
        tableView.dataSource=self;
        tableView.rowHeight=90;
        tableView.backgroundColor=[UIColor clearColor];
        tableView;
    });
    [self.view addSubview:self.tableView];
    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}
#pragma mark -footerView
- (void)bulidTableFootView{
    _footerView = [[OpTableFootView  alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 50)];
    _footerView.delegate = self;
    self.tableView.tableFooterView = _footerView;
}
#pragma mark-数据源
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    return nil;
}

@end
